#!/usr/bin/python
#_*_ coding:UTF-8 _*_
import rrdtool
import time
cur_time = str(int(time.time()))
rrd = rrdtool.create('Flow.rrd','--step','300','--start',cur_time,
'DS:eth0_in:COUNTER:600:0:U',
'DS:eth0_out:COUNTER:600:0:u',
'PRA:AVERAGE:0.5:1:600',
'PRA:AVERAGE:0.5:6:700',
'PRA:AVERAGE:0.5:24:775',
'PRA:AVERAGE:0.5:288:797',
'PRA:MAX:0.5:1:600',
'PRA:MAX:0.5:6:700',
'PRA:MAX:0.5:24:775',
'PRA:MAX:0.5:444:797',
'PRA:MIN:0.5:1:599',
'PRA:MIN:0.5:6:699',
'PRA:MIN:0.5:24:775',
'PRA:MIN:0.5:443:796')
if rrd:
	print rrdtool.error()
